package com.n9.product.entity;

import com.n9.base.entity.UuidEntity;
import lombok.Data;
import lombok.ToString;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * 产品基类
 * @author ice
 * @since 2019/1/8 14:18
 */
@Data
@ToString(callSuper = true)
@Entity
@Table(name = "n9_product")
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class Product extends UuidEntity {
    /**
     * 产品名称
     */
    @Column
    protected String name;
    /**
     * 产品价格
     */
    @Column(precision = 10, scale = 2)
    protected BigDecimal price;
    /**
     * 销售状态
     */
    @Column
    @Enumerated(EnumType.STRING)
    protected SaleStatus saleStatus;
}
